<div class="course_list">
    <div class="title">课程列表</div>
    <div class="icon-add" title="添加课程" event-click="{{'$Event.show_add_course'}}"></div>
    <div class="addbox {{$Cache_new_course_flag&&'focus'}}">
        <input type="text" bind-input="{{'$Cache_new_course_name'}}" bind-value="{{$Cache_new_course_name}}" />
        <select bind-input="{{'$Cache_new_course_type'}}" bind-value="{{$Cache_new_course_type}}">
            <option value="">请选择课程类型</option>
            <option value="2">视频</option>
            <option value="1">日程安排</option>
        </select>
        <button class="icon-queding" event-click="{{'$Event.add_course'}}" event-click-new="{{'$Event.show_add_course'}}"></button>
    </div>
    <div class="list">
        {{#if $Cache_course_list.length}} {{#each $Cache_course_list}}
        <div class="item" event-click="{{'$Top.$Event.get_course_detail'}}">{{coursename}}
            <div title="删除" class="icon-delete2" event-click="{{'$Top.$Event.remove_course'}}"></div>
        </div>
        {{/each}} {{#else}}
        <div class="item">您还没有创建任何课程
        </div>
        {{/if}}
    </div>
</div>

<div class="course_detail {{$Cache_now_show_course_type&&'focus'}}">
    <div class="title">{{$Cache_now_show_course_name}}</div>
    <div class="detail">
        {{#if $Cache_now_show_course_type==1}}
        <div class="tool">
            <div id="course_date" class="input-append date">
                <input type="text" name="end" placeholder="请选择日期" disabled="true"></input>
                <span class="add-on">
                    <i data-time-icon="icon-time" data-date-icon="icon-menu"></i>
                </span>
            </div>
            <input class="couesetext" type="text" bind-input="{{'$Cache_new_calendar_course_text'}}" placeholder="填写内容" />
            <button class="icon-add" title="添加日程安排" event-click="{{'$Event.add_course_detail'}}"></button>
        </div>
        {{#each $Cache_now_show_course_detail}}
        <div class="dateitem">
            <div class="time">{{start}}</div>
            <div class="name" title="{{title}}">{{title}}</div>
            <div class="icon-delete2" title="删除" event-click="{{'$Top.$Event.delete_calendar_one'}}"></div>
        </div>
        {{/each}} {{#else}}
        <div class="tool">
            <input class="couesetext" type="text" bind-input="{{'$Cache_new_video_path'}}" bind-value="{{$Cache_new_video_path}}" placeholder="视频路径" disabled="{{$Cache_url_self&&true}}" />
            <input class="couesetext" type="text" bind-input="{{'$Cache_new_video_name'}}" bind-value="{{$Cache_new_video_name}}" placeholder="名称" />
            <button class="icon-add" title="添加新的课程视频" event-click="{{'$Event.add_course_new_video'}}"></button>
            <div class="icon-video" title="上传本地视频" event-click="{{'$Event.open_video_up_file'}}"></div>
            <input id="course_video" event-change="{{'$Event.new_course_video_up'}}" type="file" style="display:none" />
        </div>
        {{#each $Cache_now_show_course_detail}}
        <div class="videoitem" title="{{name}}">
            <a href="course_video.html?vid={{id}}&cid={{cid}}" target="_blank"> {{date+" "+name}}</a>
            <div class="icon-delete2" title="删除" event-click="{{'$Top.$Event.delete_video_one'}}"></div>
        </div>
        {{/each}} {{/if}}
    </div>
</div>
